<!doctype html>
<html>
<head>
<meta charset='UTF-8'><meta name='viewport' content='width=device-width initial-scale=1'>
<title>02_Scala安装使用</title></head>
<body><h1>Scala安装使用</h1>
<h2>A1 安装</h2>
<ol start='' >
<li><p>官网下载：<a href='https://www.scala-lang.org/download/all.html' target='_blank' class='url'>https://www.scala-lang.org/download/all.html</a></p>
</li>
<li><p>下载后，双击msi包安装，❗️记住安装路径。</p>
<ul>
<li><p>路径要求：</p>
<ul>
<li>纯英文</li>
<li>没有空格和特殊符号</li>

</ul>
</li>

</ul>
</li>
<li><p>配置环境变量（和配置jdk一样）</p>
<ul>
<li><p>新建<code>SCALA_HOME</code></p>
<ul>
<li>地址是安装路径</li>

</ul>
</li>
<li><p>编辑Path变量</p>
<ul>
<li><code>%SCALA_HOME%\bin</code></li>

</ul>
</li>

</ul>
</li>
<li><p>测试</p>
<ul>
<li>打开cmd并输入：<code>scala -version</code></li>

</ul>
</li>

</ol>
<h2>A2 IDEA配置Scala插件</h2>
<h3>1.1 官网下载插件</h3>
<p><a href='https://plugins.jetbrains.com/' target='_blank' class='url'>https://plugins.jetbrains.com/</a></p>
<p>注意：插件版本与IDEA版本对应。</p>
<p>在IDEA文件夹<code>IntelliJ IDEA 2019.3.5\plugins\</code>下</p>
<h3>1.2 新建项目相关设置</h3>
<p>配置jdk</p>
<ul>
<li><img src="02_Scala%E5%AE%89%E8%A3%85%E4%BD%BF%E7%94%A8.assets/image-20210301151316649.png" alt="image-20210301151316649" style="zoom: 50%;" /></li>
<li><img src="02_Scala%E5%AE%89%E8%A3%85%E4%BD%BF%E7%94%A8.assets/image-20210301151504145.png" alt="image-20210301151504145" style="zoom: 50%;" /></li>

</ul>
<h3>1.3 创建Scala项目</h3>
<p>创建基础<code>scala</code>项目，配置<code>scala sdk(Software Development Kit)</code></p>
<ul>
<li><img src="02_Scala%E5%AE%89%E8%A3%85%E4%BD%BF%E7%94%A8.assets/image-20210301162219675.png" alt="image-20210301162219675" style="zoom:33%;" /></li>

</ul>
<p>&nbsp;</p>
</body>
</html>